//! 公私钥对
//!

#[derive(Debug, Clone)]
pub struct KeyPair {
    private: Vec<u8>,
    public: Vec<u8>,
}

impl KeyPair {
    pub fn new(private: Vec<u8>, public: Vec<u8>) -> Self {
        Self { private, public }
    }

    pub fn private(&self) -> &[u8] {
        &self.private
    }

    pub fn public(&self) -> &[u8] {
        &self.public
    }

    pub fn set_private(&mut self, private: Vec<u8>) {
        self.private = private;
    }

    pub fn set_public(&mut self, public: Vec<u8>) {
        self.public = public;
    }
}
